package com.example.administrator.matriximage;

import android.os.Bundle;
import android.view.View;

import com.example.administrator.matriximage.uievent.InterEvent;
import com.example.administrator.matriximage.uievent.viewmsg.ViewMsg;
import com.example.administrator.matriximage.viewpack.MatrixImage;
import com.example.administrator.matriximage.viewpack.group.InterRecylerView;
import com.squareup.picasso.Picasso;

public class MainActivity extends BaseActivity implements View.OnClickListener{



    InterRecylerView inteRecyler=null;
    MatrixImage matrixImage=null;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        findViewById(R.id.btLook).setOnClickListener(this);
        findViewById(R.id.btPaint).setOnClickListener(this);
        findViewById(R.id.btRevoke).setOnClickListener(this);
        matrixImage=findViewById(R.id.matrixImage);
        Picasso.with(this).load("https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=1726758900,3015629532&fm=27&gp=0.jpg").into(matrixImage);


    }


    @Override
    public void viewMsg(ViewMsg viewMsg) {
        super.viewMsg(viewMsg);

        if(viewMsg.getObject() instanceof InterEvent)
        {
            InterEvent interEvent= (InterEvent) viewMsg.getObject();
            boolean inter =  interEvent.isIntercept();
            inteRecyler.setInter(inter);
        }

    }

    @Override
    public void onClick(View view)
    {
        switch (view.getId())
        {
            case R.id.btLook:
            {

            }
            break;
            case R.id.btPaint:
            {

            }
            break;
            case R.id.btRevoke:
            {

            }
            break;

        }

    }


}
